-- GENERATED SPELL FOR [Nezzliok the Dire] --


function spell0_1062(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(421,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1062', 2000, 1)
end

function spell1_1062(pUnit, Event) --@Shock,n/a--
pUnit:FullCastSpellOnTarget(2610,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1062', 0, 1)
end

function Sorts_1062(pUnit, Event)
local choix_sorts_1062 = math.random(0, 1)
if choix_sorts_1062 == 0 then
pUnit:RegisterEvent('spell0_1062', 1, 1)
end
if choix_sorts_1062 == 1 then
pUnit:RegisterEvent('spell1_1062', 1, 1)
end
end

function mob1062_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1062', math.random(1500, 3000), 1)
end

function mob1062_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1062_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1062_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1062, 1, 'mob1062_Action')
RegisterUnitEvent(1062, 2, 'mob1062_Leave')
RegisterUnitEvent(1062, 3, 'mob1062_Kill')
RegisterUnitEvent(1062, 4, 'mob1062_Die')
